package model.semantics.ternary;

import model.RGBColor;
import model.semantics.TernaryOperation;
/**
 * Token class for color which we are considering a ternary function to work with our parser.
 * In the parser, all square brackets [ x , y , z ] are replaced with COLOR ( x , y , z ) and
 * treated as ternary.
 * 
 * @author Anne Weng
 * @author Troy Ferrell
 *
 */
public class Color extends TernaryOperation
{
	protected boolean leftAssociative = false;
	
	public Color(int precedence)
	{
		super(precedence);
	}
	
	@Override
	protected RGBColor evaluateColor(RGBColor first, RGBColor second, RGBColor third)
	{
		return new RGBColor(first.getRed(),second.getGreen(),third.getBlue());
		
	}
}
